package com.android.camera.manager;

import android.view.View;

import com.android.camera.CameraActivity;
import com.android.camera.R;
import com.android.camera.ui.RotateImageView;

import com.mediatek.camera.util.Log;

public class RGKSettingIndictorPickerOnePage extends ViewManager implements View.OnClickListener {
    private static final String TAG = "RGKSettingIndictorPickerOnePage";

    private RotateImageView mIndicator;

    CameraActivity mContext;

    public RGKSettingIndictorPickerOnePage(CameraActivity context) {
        super(context, VIEW_LAYER_OVERLAY);

        mContext = context;
        // mListener = listener;
    }

    @Override
    public View getView() {
        View view = inflate(R.layout.rgk_setting_indicator);
        mIndicator = (RotateImageView) view.findViewById(R.id.rgk_setting_indicator);
        mIndicator.setOnClickListener(this);

        Log.i(TAG, "[getView], view:" + view);
        return view;
    }

    @Override
    public void onClick(View v) {
        Log.i(TAG, "onClick()");
        if (v == mIndicator) {
            if (mContext.getRGKSettingBaseOnMtkSettingManager().isShowSettingContainer()) {
                Log.i(TAG, "onClick() hide");
                mContext.getRGKSettingBaseOnMtkSettingManager().hideSetting();
                // hide();
            } else {
                Log.i(TAG, "onClick() show");
                mContext.getRGKSettingBaseOnMtkSettingManager().showSetting();
                mContext.getModePicker().hide();
                hide();
            }
        }
    }
}
